package svgedit.gui.actions;

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import svgedit.gui.Frame;

/**
 * Shows discard changes dialog, then presents a file dialog for the user to
 * select an existing document to edit.
 */
public class SaveAction extends AbstractAction
{
	private static final long serialVersionUID = 7209997278168227492L;

	/** Create this action for the given frame */
	public SaveAction()
	{
		super("Save");
	}

	/**
	 * Calls frame.SaveFile() on menuItem File->save when invoked
	 * {@link svgedit.gui.Frame}
	 */
	public void actionPerformed(ActionEvent ae)
	{
		Frame.getFrame().saveFile(Frame.DIALOG_MODE_CHECK);

	}
}
